home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
pcbss30.zip
/
SSREF.DOC
< prev
Wrap
Text File
|
1992-11-22
|
83KB
|
2,273 lines
Command Reference by Subject
─────────────────────────────────────────────────────────────────────────────
Caller Data Modification
ADJTIME <option> <minutes>
DECREASE <dec> <min>
GETCINFO <conf> <flag> <var>
INCREASE <inc> <max>
SEC_TABLE
SEC_LOOKUP <file>
SETCINFO <conf> <flag> <state>
UPDATE_USER_RECORD
Math Funtions
ADD <var> <val1> <val2>
SUB <var> <val1> <val2>
MUL <var> <val1> <val2>
DIV <var> <val1> <val2>
INC <var>
DEC <var>
Data File Funtions
CLOSE <hdl>
CREATE <hdl> <format> <file>
FORMAT <fname> <key flds...>
OPEN <hdl> <file>
READP <hdl> <format>
READN <hdl> <format>
READL <hdl> <format>
READF <hdl> <format>
READ <hdl> <format> [key]
WRITE <hdl> <format>
Data Entry Funtions
ACCEPT <row> <col> <prompt> <var>
AUTOENTER
BEEPS <ON/OFF>
ESC_TO <label>
ESC_CHK <ON/OFF>
GETMSG <format> <srow> <scol> <rows> <cols>
FIELDS <name> <type> <len> <prec> <min> <mask> <default>
FLUSH_KB
FORCE_ENTER
NULL_ENTRY <label>
PROMPT <prompt> <var>
SETMASK <var> <mask>
Date/Time Funtions
CURDATE <type> <sep> <var>
CURTIME <type> <var>
DATEADD <date> <days> <var>
DATEADDM <date> <months> <var>
DATEDIF <date1> <date2> <var>
DATESUB <date> <days> <var>
DATESUBM <date> <months> <var>
Display Funtions
DISPLAY <row> <col> <..data..>
DISPLAYC <row> <..data..>
DISPLAY_FILE <file>
GOTORC <row> <col>
INDENT <cols>
REPEAT <row> <col> <char> <cnt>
TEXT <..data..>
Display Control Funtions
CLEARCRT
CLEARLINES <row1> <row2>
COLOR [BRIGHT] <fcolor> [BLINK] <bcolor>
ENTRY_MIN_CHAR <char>
ENTRY_MIN_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
ENTRY_MAX_CHAR <char>
ENTRY_MAX_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
ENTRY_ANS_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
NEWLINE <count>
String Funtions
RANDOM_STR <count> <var>
SET <var> <val>
TRIMR <var> [<var>...<var>]
TRIML <var> [<var>...<var>]
TRIM <var> [<var>...<var>]
LCASE <var> [<var>...<var>]
UCASE <var> [<var>...<var>]
PARSE <string>
GETWORD <var>
SUBSTR <var> <start> <len> <result_var>
Script Flow Control Funtions
IF/ELSE/ENDIF
SWITCH/CASE/DCASE/BREAK
GOTO <label>
GOSUB <label>
RETURN
EXIT <ALL>
CALL <script> <label>
RUN <script> <label>
Script Control Funtions
DELAY <x>
DOS <cmd>
ESET <evar> <val>
FREECORE
GOODBYE
HANGUP
INCLUDE <file>
LOG_MSG <msg>
LOG_DATA <file>
MSG
SRCHTXTFILE <srchtxt> <file>
SHELL <prg> <parms>
VALIDCREDITCARD <card#> <var>
CallBack Funtions
CALLBACK <lmt> <mdm_cmd>
PARSEPHONE <phone#> <area> <exchg> <number>
SENDMODEM <lmt> <cmnd>
Command Reference
─────────────────────────────────────────────────────────────────────────────
--------------------------------------------------------------------------
ACCEPT <row> <col> <prompt> <var>
--------------------------------------------------------------------------
Desc: Get keyboard input from caller, at a specific row and column.
Parms: row Row to start display of "prompt". 1 based.
col Column to start display of "prompt". 1 based.
prompt Prompt string to display.
var Variable to store the user input.
Notes: When the caller is in non-graphics mode and the script uses an
ACCEPT command, it will be internally converted to a PROMPT
command. Any row/col information is ignored and the resulting
display may not be what you expect. You should experiment with
this feature in both graphics modes to verify that your
scripts operate as expected.
Example: ACCEPT 22 1 "Enter Option " Op
--------------------------------------------------------------------------
ADD <var> <val1> <val2>
--------------------------------------------------------------------------
Desc: Add "val1" and "val2", then store the result in variable
"var".
Parms: var Variable to store result in.
val1 First value to add
val2 Second value to add
Notes: The result is treated as a 10.2 float value.
Example: ADD Tot Price Tax ;Tot = Price + Tax
ADD Tot Price 3 ;Tot = Price + 3
--------------------------------------------------------------------------
ADJTIME <option> <minutes>
--------------------------------------------------------------------------
Desc: Modify the amount of online time for the caller.
Parms: option 'ADD' to add time, 'SUB' to subtract it.
minutes The number of minutes to add/subtract.
Notes: none
Example: ADJTIME ADD 15 ;add 15 minutes to callers online time.
--------------------------------------------------------------------------
ENTRY_ANS_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
--------------------------------------------------------------------------
Desc: Defines the color of the user entered data in PROMPT and
ACCEPT commands.
Parms: BRIGHT Optional modifier to cause the foreground color to
display as bright.
fcolor The foreground color to use.
BLINK Optional modifier to cause the display to blink.
bcolor The background color to use.
Notes: This command may only be used if the caller in is graphics
mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
MAGENTA, CYAN and WHITE.
Example: ENTRY_ANS_ATTR BRIGHT WHITE BLACK
--------------------------------------------------------------------------
AUTOENTER <ON/OFF>
--------------------------------------------------------------------------
Desc: Cause PCBSuperScript to simulate a press of the <ENTER> key
when the caller reaches the end of the current entry field.
This command can be used with a 1 character field to provide
"hot-key" fields.
Parms: ON Turn AUTOENTER mode on.
OFF Turn AUTOENTER mode off.
Notes: none
Example: AUTOENTER
--------------------------------------------------------------------------
BEEPS <ON/OFF>
--------------------------------------------------------------------------
Desc: When the caller has exhausted the entry space of a field, or
entered invalid data for the field, PCBSuperScript emits a
"beep" to the caller. By default BEEPS is ON.
Parms: ON Turn beeps on (default).
OFF Turn beeps off
Notes: None.
Example: BEEPS ON ;turn beeps on
--------------------------------------------------------------------------
CALL <script> <label>
--------------------------------------------------------------------------
Desc: Execute another script. The script that is run will return
control to the caller on exit.
Parms: script The name of the script to run.
label Optional label to start execution at.
Notes: none
Example: CALL "menu.def" StartUp
--------------------------------------------------------------------------
CALLBACK <lmt> <mdm_cmd>
--------------------------------------------------------------------------
Desc: Enter callback sequence.
Parms: lmt Time limit in seconds
mdm_cmd Modem command. You must also include "ATDT" in the
command.
Notes: none
Example: set mcmd "ATDT" Num2Call
callback 5 mcmd
--------------------------------------------------------------------------
CLEARCRT
--------------------------------------------------------------------------
Desc: Clears the screen.
Parms: None.
Notes: This command may only be used if the caller in is graphics
mode.
Example: CLEARCRT
--------------------------------------------------------------------------
CLEARLINES <row1> <row2>
--------------------------------------------------------------------------
Desc: Clear a specified block of rows on the screen.
Parms: row1 First row to clear
row2 Last row to clear
Notes: This command may only be used if the caller in is graphics
mode.
Example: CLEARLINES 5 17 ;clear lines 5 - 17
--------------------------------------------------------------------------
CLOSE <hdl>
--------------------------------------------------------------------------
Desc: CLOSE the specified 'hdl' and flushes data buffers associated
with it.
Parms: hdl File handle to use. Valid range is 0 to 9.
Notes: A HDL that has not been opened may safely be closed.
The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
This macro should be checked after a data file function to
insure proper script operation. See ORDER.DEF for examples of
these commands.
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READ 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
COLOR [BRIGHT] <fcolor> [BLINK] <bcolor>
--------------------------------------------------------------------------
Desc: Sets the display color.
Parms: BRIGHT Optional modifier to cause the foreground color to
display as bright.
fcolor The foreground color to use.
BLINK Optional modifier to cause the display to blink.
bcolor The background color to use.
Notes: This command may only be used if the caller in is graphics
mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
MAGENTA, CYAN and WHITE.
Example: COLOR BRIGHT CYAN BLACK
--------------------------------------------------------------------------
CREATE <hdl> <format> <file>
--------------------------------------------------------------------------
Desc: Create a dBase file
Parms: hdl File handle to use. Valid range is 0 to 9.
format The name of the FORMAT for this file.
file The name of the file.
Notes: The file will be open on return.
The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
This macro should be checked after a data file function to
insure proper script operation. See ORDER.DEF for examples of
these commands.
Example: close 1 ;close file
open 1 @ss_path@ sscfig ;open cfig file
if @file_stat@ != "*OK*" ;chk for err
create 1 SysInfo @ss_path@ sscfig ;create file
if @file_stat@ != "*OK*" ;chk for err
text "Cannot create SSCFIG file." ;
force_enter ;
exit all ;
endif ;
write 1 SysInfo ;
endif ;
--------------------------------------------------------------------------
CURDATE <type> <sep> <var>
--------------------------------------------------------------------------
Desc: Return the current date in the specified format.
Parms: type 0 Tuesday March 14, 1992
1 Tue March 14, 1992
2 March 14, 1992
3 14 Mar 92
4 m-d-yy
5 mm-dd-yy
6 d-m-yy
7 dd-mm-yy
8 yy-m-d
9 yy-mm-dd
10 m-d-yyyy
11 mm-dd-yyyy
12 mmddyy
13 yymmdd
sep The seperator character used in types 4-11.
var The name of the variable to store the date in.
Notes: none
Example: CURDATE 1 '/' xdate ;xdate = "Tue March 14, 1992"
CURDATE 4 '/' xdate ;xdate = "3/14/92"
CURDATE 11 '-' xdate ;xdate = "03-14-1992"
--------------------------------------------------------------------------
CURTIME <type> <var>
--------------------------------------------------------------------------
Desc: Return the current time in the specified format.
Parms: type 0 05:58:48.26
1 05:58:48
2 5:58 AM
3 5:58a
4 5:58
5 05:58
var The name of the variable to store the time in.
Notes: none
Example: CURTIME 1 xtime ;xtime = "05:58:48"
CURTIME 3 xtime ;xtime = "5:58a"
CURTIME 4 xtime ;xtime = "5:58"
--------------------------------------------------------------------------
DATEADD <date> <days> <var>
--------------------------------------------------------------------------
Desc: Add a specified number of days to a date.
Parms: date The date to add to.
days The number of days to add
var The name of the variable to store the date in.
Notes: The date must be in MM-DD-YY format. The seperator character
may be any of your choice.
Example: CURDATE 5 '/' xdate ;xdate = "03/14/92"
DATEADD xdate 30 xdate ;xdate = xdate + 30 days
--------------------------------------------------------------------------
DATEADDM <date> <months> <var>
--------------------------------------------------------------------------
Desc: Add a specified number of months to a date.
Parms: date The date to add to.
months The number of months to add
var The name of the variable to store the date in.
Notes: The date must be in MM-DD-YY format. The seperator character
may be any of your choice. The resulting date is validated for
a correct day value. If the day is greater than allowed for a
given month, the day value is adjusted to the last day in the
month. See example #3 below.
Example: CURDATE 5 '/' xdate ;xdate = "03/14/92"
DATEADDM xdate 1 xdate ;xdate = "04/14/92"
CURDATE 5 '/' xdate ;xdate = "12/14/91"
DATEADDM xdate 1 xdate ;xdate = "01/14/92"
CURDATE 5 '/' xdate ;xdate = "08/30/92"
DATEADDM xdate 6 xdate ;xdate = "02/28/93" <-- note day
--------------------------------------------------------------------------
DATEDIF <date1> <date2> <var>
--------------------------------------------------------------------------
Desc: Calculate the number of days between two dates.
Parms: date1 Date string 1.
date2 Date string 2.
var The name of the variable to store the date in.
Notes: The date must be in MM-DD-YY format. The seperator character
may be any of your choice.
Example: DATEDIF xdate1 xdate2 xdif ;xdif = xdate1 - xdate2
--------------------------------------------------------------------------
DATESUB <date> <days> <var>
--------------------------------------------------------------------------
Desc: Subtract a specified number of days from a date.
Parms: date The date to subtract from.
days The number of days to subtract.
var The name of the variable to store the date in.
Notes: The date must be in MM-DD-YY format. The seperator character
may be any of your choice.
Example: CURDATE 5 '/' xdate ;xdate = "03/14/92"
DATESUB xdate 30 xdate ;xdate = xdate - 30 days
--------------------------------------------------------------------------
DATESUBM <date> <months> <var>
--------------------------------------------------------------------------
Desc: Subtract a specified number of months from a date.
Parms: date The date to subtract from.
months The number of months to subtract.
var The name of the variable to store the date in.
Notes: The date must be in MM-DD-YY format. The seperator character
may be any of your choice. The resulting date is validated for
a correct day value. If the day is greater than allowed for a
given month, the day value is adjusted to the last day in the
month. See example #3 below.
Example: CURDATE 5 '/' xdate ;xdate = "03/14/92"
DATESUBM xdate 1 xdate ;xdate = "02/14/92"
CURDATE 5 '/' xdate ;xdate = "01/14/92"
DATESUBM xdate 1 xdate ;xdate = "12/14/91"
CURDATE 5 '/' xdate ;xdate = "03/31/92"
DATESUBM xdate 1 xdate ;xdate = "02/29/92" <-- note day
--------------------------------------------------------------------------
DECREASE <dec> <min>
--------------------------------------------------------------------------
Desc: Decrease caller security level by 'dec', but do not allow to
be less than 'min'.
Parms: dec Decrement amount.
min Minimum allowed value of security level
Notes: A modified security level is not written back to the user file
until the UPDATE_USER_RECORD command is executed.
Example: DECREASE 1 10
--------------------------------------------------------------------------
DEC <var>
--------------------------------------------------------------------------
Desc: Decrement the specified variable by 1.
Parms: var The variable to decrement.
Notes: none
Example: DEC Row ;Counter = Counter - 1
--------------------------------------------------------------------------
DELAY <x>
--------------------------------------------------------------------------
Desc: Pause script execution for "x" seconds.
Parms: x The number of seconds to pause.
Notes: none
Example: DELAY 5 ;pause script for 5 seconds
--------------------------------------------------------------------------
DISPLAY <row> <col> <..data..>
--------------------------------------------------------------------------
Desc: Display the specified data at a specified row and column.
Parms: row Row to start display of "..data..". 1 based.
col Column to start display of "..data". 1 based.
..data.. The data to display.
Notes: This command may only be used if the caller in is graphics
mode.
Example: DISPLAY 5 15 "This is your name: " @user@
--------------------------------------------------------------------------
DISPLAYC <row> <..data..>
--------------------------------------------------------------------------
Desc: Display the specified data centered on a specified row.
Parms: row Row to start display of "..data..". 1 based.
..data.. The data to display.
Notes: This command may only be used if the caller in is graphics
mode.
Example: DISPLAYC 5 "This is some centered data"
--------------------------------------------------------------------------
DISPLAY_FILE <file>
--------------------------------------------------------------------------
Desc: Display the contents of a file to the screen.
Parms: file The file name to display.
Notes: none.
Example: DISPLAY_FILE J:\PCB\SS\NEWCALL.MSG
--------------------------------------------------------------------------
DIV <var> <val1> <val2>
--------------------------------------------------------------------------
Desc: Divide "val1" by "val2", then store the result in variable
"result_var".
Parms: var Variable to store result in.
val1 Dividend
val2 Divisor
Notes: The result is treated as a 10.2 float value.
Example: DIV Temp Tot / Qty ;Temp = Tot / Qty
DIV Tot Price 3 ;Tot = Price / 3
--------------------------------------------------------------------------
DOS <cmd>
--------------------------------------------------------------------------
Desc: Perform a DOS command.
Parms: cmd The command to perform.
Notes: none
Example: DOS "del *.bak"
--------------------------------------------------------------------------
ESC_CHK <ON/OFF>
--------------------------------------------------------------------------
Desc: Turn escape checking on or off during input.
Parms: ON Turn escape checking on.
OFF Turn escape checking off.
Notes: none
Example: ESC_CHK ON ;turn escape checking on
PROMPT " Name: " Name ;get name from caller
IF @esc_pressed@ == 1 ;chk for esc press
GOTO AbortJob ; abort script if pressed
ENDIF ;
--------------------------------------------------------------------------
ESC_TO <label>
--------------------------------------------------------------------------
Desc: Set escape processing mode for PROMPT and ACCEPT commands.
Parms: label The label to branch to if ESC is pressed during a
PROMPT or ACCEPT command.
Notes: none
Example: :AddRec
ESC_CHK ON ;turn escape checking on
ESC_TO AddRec99 ;set ESC_TO label
PROMPT "Name: " Name ;get name from caller
.....
.....
:AddRec99 ;exit label
ESC_TO ;reset ESC_TO label
ESC_CHK OFF ;turn escape checking on
RETURN ;return to caller
--------------------------------------------------------------------------
ESET <evar> <val>
--------------------------------------------------------------------------
Desc: Set's the environment variable "evar" to "val".
Parms: evar The name of the environment variable to set.
Notes: none
Example: ESET DSZLOG "J:\PCB\DSZLOG" @node@ ".LOG"
--------------------------------------------------------------------------
EXIT <ALL>
--------------------------------------------------------------------------
Desc: Exit PCBSuperScript.
Parms: ALL Optional. Exit all scripts from all levels.
Notes: If the current script has been CALLed from another script,
control will be return to the caller.
Example: EXIT
--------------------------------------------------------------------------
FIELDS
<name> <type> <len> <prec> <min> <mask> <default>
.......
.......
<name> <type> <len> <prec> <min> <mask> <default>
FIELDS
--------------------------------------------------------------------------
Desc: Defines variables to be used in the script.
Parms: name The name of the variable. 1 to 20 char's. Case *is*
significant. If the variable name is already
defined, this definition will be ignored (but no
eror will occur).
type The type of the field.
'C' Character field.
'N' Numeric field.
len The length of this variable. For 'C' type fields,
this should be the TOTAL length of the field,
including any mask characters, etc. If the field is
type 'N', this represents the number of digits to
the left of the decimal point.
prec The precision of this variable. If the field type is
'C', the precision is forced to 0. For 'N' type
fields, this represents the number of digits to the
right of the decimal point.
min The minimum entry length of this variable (in an
ACCEPT or PROMPT command).
mask The entry mask. The "mask" field provides
PCBSuperScript with information on how it should
handle user entry for this variable.
The mask is a combination of special formatting
characters and literal text that describes how each
character of the field should be handled. A mask may
consist of literal characters or any of the
following special characters:
% digits 0-9, minus ('-'), space
9 digits 0-9
* any character (ascii 32-255)
! printable characters (ascii 32-127)
a space, a-z, A-Z, 0-9 (converts to lower)
A space, a-z, A-Z, 0-9 (converts to upper)
h hex char's 0-9, a-f, A-F (converts to lower)
H hex char's 0-9, a-f, A-F (converts to upper)
Y Yes or No
P Protected. A dot ('.') is eched back to the
caller.
<> Inclusion set. Char's between matching <> are
considered the only allowable char's for the
position marked by '<'.
If the length of the mask is less than the defined
length of the variable, the mask is expanded to the
defined length. The last character in the mask is
used for the expansion. See 'Name' field below.
default The default value of the field (optional). This can
be any text enclosed by matching quotes, system
variables or environmental variables (see System
Variables).
Notes: none
Example: FIELDS
Option C 1 0 1 <ALEale>
Name C 25 0 0 *! @user@
Company C 25 0 3 !
Addr C 25 0 5 !
CitySt C 25 0 5 ! @city@
Zip C 5 0 5 99999
Country C 15 0 3 ! USA
Phone C 13 0 13 (999)999-9999
Fax C 13 0 0 (999)999-9999
Num2Call C 45 0 0 *
Age C 2 0 2 99
How C 25 0 0 !
Occup C 25 0 0 !
PCType C 25 0 0 !
NetWork C 25 0 0 !
FIELDS
--------------------------------------------------------------------------
FLUSH_KB
--------------------------------------------------------------------------
Desc: Discard any characters remaining in the keyboard buffer.
Parms: None.
Notes: none.
Example: FLUSH_KB
--------------------------------------------------------------------------
FORCE_ENTER
--------------------------------------------------------------------------
Desc: Displays a "Press Enter to continue..." prompt, and waits for
the caller to press ENTER.
Parms: none.
Notes: none.
Example: FORCE_ENTER
--------------------------------------------------------------------------
FORMAT <fname> <key flds...>
<vname>
...
FORMAT
--------------------------------------------------------------------------
Desc: Defines a format to use with READ or WRITE.
Parms: fname The name of the format. 1 to 32 char's. Case *is*
significant.
key flds The name(s) of the fields in this format that
comprise the key to a record (multiple key segments
are supported).
vname The name of a previously defined variable.
Notes: Variables referenced must be previously defined in a FIELDS
block.
Example: FIELDS
Name C 25 0 0 *! @user@
Company C 25 0 3 !
Addr C 25 0 5 !
CitySt C 25 0 5 ! @city@
Zip C 5 0 5 99999
Country C 10 0 3 ! USA
Phone C 13 0 13 (999)999-9999
Fax C 13 0 0 (999)999-9999
Age C 2 0 2 99
How C 25 0 0 !
Occup C 25 0 0 !
PCType C 25 0 0 !
NetWork C 25 0 0 !
NetWork C 25 0 0 !
BankTime N 3 0 0 999 0
Num2Call C 45 0 0 *
FIELDS
FORMAT HistFmt Name
Name
Company
Addr
CitySt
Zip
Country
Phone
Fax
Age
How
Occup
PCType
NetWork
BankTime
Num2Call
FORMAT
--------------------------------------------------------------------------
INC <var>
--------------------------------------------------------------------------
Desc: Increment the value of 'var' by one.
Parms: var the variable to increment
Notes: none.
Example: INC Counter ;Counter = Counter + 1
--------------------------------------------------------------------------
INDENT <cols>
--------------------------------------------------------------------------
Desc: Indent the data displayed by the TEXT command.
Parms: cols the number of cols to indent
Notes: none.
Example: INDENT 5 ;indent all TEXT displays 5 cols
--------------------------------------------------------------------------
GETCINFO <conf> <flag> <var>
--------------------------------------------------------------------------
Desc: Gets the status of a specified conference for the caller.
Parms: conf the conference number (0=main).
flag REGISTERED,EXPIRED,SCANMAIL,SYSOP,HASMAIL,JOINED,
SCANNED.
var the variable to store result of command.
Notes: 'var' will be set to '1' if the flag is true, and to '0'
otherwise.
Example: GETCINFO 0 REGISTERED xvar
--------------------------------------------------------------------------
GETWORD <var>
--------------------------------------------------------------------------
Desc: Gets the next word from "string" (referred to by a previous
PARSE command). If the end of line is reached, "var" will be
set to the value "*EOL*".
Parms: var variable to store result in.
Notes: The commands "PARSE" and "GETWORD" allow scripts to parse data
fields or environment variables into individual words. To use
these commands, "PARSE" *MUST* be called FIRST to setup
subsequent calls to "GETWORD".
Example: ......
......
PARSE @%PCBDOOR
GETWORD Option
IF Option == "*EOL*"
GOTO BadCmd
ENDIF
GETWORD FileName
IF FileName == "*EOL*"
GOTO BadCmd
ENDIF
......
......
--------------------------------------------------------------------------
GETMSG <format> <srow> <scol> <rows> <cols>
--------------------------------------------------------------------------
Desc: Enter data in a message controlled format.
Parms: format The name of the FORMAT for this message.
srow The starting row of the message entry area.
scol The starting col of the message entry area.
rows The number of DISPLAY rows of the msg. The number of
message rows are deduced from the the number of
fields defined in the format used with this msg
command.
cols The number of display columns for this message entry
area.
Notes: The GETMSG has the same commands, and acts in the same manner
as the PCBoard full screen message entry does. This command is
most often used to get caller comments, special instructions,
etc... Note that the caller must be in graphics mode for this
command to function correctly.
Example: FIELDS
msg1 C 30 0 0 "*" ""
msg2 C 30 0 0 "*" ""
msg3 C 30 0 0 "*" ""
msg4 C 30 0 0 "*" ""
msg5 C 30 0 0 "*" ""
msg6 C 30 0 0 "*" ""
msg7 C 30 0 0 "*" ""
msg8 C 30 0 0 "*" ""
msg9 C 30 0 0 "*" ""
msg10 C 30 0 0 "*" ""
FIELDS
...
...
FORMAT MsgFmt
msg1
msg2
msg3
msg4
msg5
msg6
msg7
msg8
msg9
msg10
FORMAT
...
...
getmsg MsgFmt 8 9 5 30 ;enter a msg at row 8, col 9. There
;will be 5 displayed rows and 30
;display columns, but the caller can
;enter upto 10 message lines (rows).
;The message data will scroll as
;needed during entry.
--------------------------------------------------------------------------
FREECORE
--------------------------------------------------------------------------
Desc: Display the amount of free PCBSuperScript variable memory in
bytes.
Parms: none
Notes: none.
Example: FREECORE
--------------------------------------------------------------------------
GOODBYE
--------------------------------------------------------------------------
Desc: Hangup the caller and say goodbye from the script and
PCBoard.
Parms: none
Notes: none.
Example: GOODBYE
--------------------------------------------------------------------------
GOSUB <label>
--------------------------------------------------------------------------
Desc: Perform subroutine at "label".
Parms: label the label to transfer execution to
Notes: The label that is referenced by the GOSUB command may be a
variable.
Example: ...
...
TEXT "prior to GOSUB"
GOSUB There
TEXT "back from GOSUB"
STOP
:There
TEXT "in GOSUB"
RETURN
--------------------------------------------------------------------------
GOTO <label>
--------------------------------------------------------------------------
Desc: Transfer control to the specified "label". The "label"
referenced by the GOTO command must exist in the script file.
Parms: label the label to transfer execution to
Notes: The label that is referenced by the GOTO command may be a
variable.
Example: ...
...
:There
....
....
....
GOTO There
...
...
--------------------------------------------------------------------------
GOTORC <row> <col>
--------------------------------------------------------------------------
Desc: Positions the cursor to "row" and "col".
Parms: row 1 based row value
col 1 based column value
Notes: This command may only be used if the caller in is graphics
mode.
Example: GOTORC 1 1
--------------------------------------------------------------------------
HANGUP
--------------------------------------------------------------------------
Desc: Drop DTR on caller.
Parms: none
Notes: none
Example: HANGUP
--------------------------------------------------------------------------
IF <val1> [<test> <val2>]
<stmnts>
[ELSE
<stmnts>]
ENDIF
--------------------------------------------------------------------------
Desc: Allow selective execution of script statements based on
variable values. The IF/ELSE/ENDIF clause is used as in most
any other language. Note that the ENDIF statement MUST be
used.
If only one field is used in the IF statement, it is simply
tested for NULL. For example:
IF Name
...
ENDIF
Is the same as:
IF Name != ""
...
ENDIF
If the ELSE statement is included, statements between it and
the matching ENDIF statement are executed if the previous IF
statement fails.
Parms: val1 The first of two values to test.
test The test to perform. Valid test operators are:
== equal
!= not equal
> greater than
>= greater than, or equal
< less than
<= less than, or equal
? if val1 is in val2
!? if val1 is not in val2
val2 The second of two values to test.
stmnts Any number of valid statements.
Notes: The IF/ELSE/ENDIF clause may be nested to any level.
--------------------------------------------------------------------------
IMAGE row col
...data...
...data...
IMAGE
--------------------------------------------------------------------------
Desc:
Parms: var variable to store result in.
Notes:
Example: ......
--------------------------------------------------------------------------
INCREASE <inc> <max>
--------------------------------------------------------------------------
Desc: Increase sec level by 'inc', but do not allow to be more than
'max'.
Parms: inc increment amount.
max maximum allowed value of security level
Notes: A modified security level is not written back to the user file
until the UPDATE_USER_RECORD command is executed.
Example: INCREASE 1 10
--------------------------------------------------------------------------
INCLUDE <file>
--------------------------------------------------------------------------
Desc: Reads a specified file into the current script, at the
location of the "INCLUDE" command.
Parms: file The file name to include.
Notes: "INCLUDE" statements may be nested to a level of 10.
Example: INCLUDE "J:\PCB\SS\DEF.INC"
--------------------------------------------------------------------------
LCASE <var>
--------------------------------------------------------------------------
Desc: Converts all characters in "var" to lower case.
Parms: var The variable to modify.
Notes: none
Example: LCASE Occupation
--------------------------------------------------------------------------
LOG_DATA <file>
<..data..>
...
LOG_DATA
--------------------------------------------------------------------------
Desc: Define what and where PCBSuperScript will log data to. If the
file currently exists, it will be appended to, otherwise it
will be created.
Parms: file The log file name.
..data.. The data to write to the log file.
Notes: Lines between matching "LOG_DATA" keywords, are considered log
file descriptor lines. The format for a log file descriptor
line is a variable combination of literal data, field names,
system variables and environment variables. The combined total
length of a log file descriptor line (after macro and variable
expansion) may not exceed a length of 512.
Example: LOG_DATA J:\PCB\SS\NEWCALL.LOG
" Name: " Name
" Company: " Company
" Address line 1: " Addr1
" Address line 2: " Addr2
" City, State: " CitySt
" Zip: " Zip
" Country: " Country
" Phone Number: " Phone
" Fax Number: " Fax
" Date/Time: " @sysdate@ @systime@
" Node/Port/Baud: " @node@ @port@ @bps@
LOG_DATA
--------------------------------------------------------------------------
LOG_MSG <msg>
--------------------------------------------------------------------------
Desc: Writes "msg" to the caller log file for this node.
Parms: msg The message to write.
Notes: none
Example: LOG_MSG @user@ " accessed this door"
--------------------------------------------------------------------------
ENTRY_MAX_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
--------------------------------------------------------------------------
Desc: Defines the color of the "maximum" field character in PROMPT
and ACCEPT commands.
Parms: BRIGHT optional modifier to cause the foreground color to
display as bright.
fcolor the foreground color to use.
BLINK optional modifier to cause the display to blink.
bcolor the background color to use.
Notes: This command may only be used if the caller in is graphics
mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
MAGENTA, CYAN and WHITE.
Example: ENTRY_MAX_ATTR BLUE BLACK
--------------------------------------------------------------------------
ENTRY_MAX_CHAR <char>
--------------------------------------------------------------------------
Desc: Defines the character used to signify the maximum number of
characters to be entered in PROMPT and ACCEPT commands. The
default is a period ('.').
Parms: char The new character to use.
Notes: none
Example: ENTRY_MAX_CHAR "\xFA"
--------------------------------------------------------------------------
ENTRY_MIN_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
--------------------------------------------------------------------------
Desc: Defines the color of the "minimum" field character in PROMPT
and ACCEPT commands.
Parms: BRIGHT optional modifier to cause the foreground color to
display as bright.
fcolor the foreground color to use.
BLINK optional modifier to cause the display to blink.
bcolor the background color to use.
Notes: This command may only be used if the caller in is graphics
mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
MAGENTA, CYAN and WHITE.
Example: ENTRY_MIN_ATTR RED BLACK
--------------------------------------------------------------------------
ENTRY_MIN_CHAR <char>
--------------------------------------------------------------------------
Desc: Defines the character used to signify the minimum number of
characters to be entered in PROMPT and ACCEPT commands. The
default is an underscore ('_').
Parms: char The new character to use.
Notes: none
Example: ENTRY_MIN_CHAR "\xC4"
--------------------------------------------------------------------------
MSG
<to>
<from>
<subject>
<security>
<conf>
...message data...
...
MSG
--------------------------------------------------------------------------
Desc: The "MSG" command adds a message to a specified message base.
Parms: to The name of the person this message is being sent
to. This can be a literal value, a system variable
(i.e. @user@) or a variable currently defined in the
script.
from The name of the person this message is from. This
can be a literal value, a system variable (i.e.
@user@) or a variable currently defined in the
script.
subject The subject of this message. This can be a literal
value or a variable currently defined in the script.
security The security of this message. Valid choices are
"Private", Comment" and "Public" (case is not
significant). This can be a literal value or a
variable currently defined in the script.
conf The conference to place the message in. This can be
a literal value or a variable currently defined in
the script. Note that the spelling *and* case of the
conference name *MUST* be exact.
msg data The text body of the message. Up to 99 lines will be
processed. This can be any combination of literal
data, system variables and currently defined script
variables.
Example: ;
;send comment to sysop
;
MSG
SYSOP ;to
SYSOP ;from
"New User Called" ;subj
Comment ;sec
"Main Board" ;conf
"A new user named " @user@ " has called the system."
"The date and time was " @sysdate@ " : " @systime@ "."
"They are from " @city@ "
"Their phone is " Phone
"Their occupation is " Occup "
"They are " Age " years old."
""
"Node: " @node@ " Baud Rate: " @bps@
MSG
;
;send private msg to the new caller
;
MSG
@user@ ;to
SYSOP ;from
"Welcome!" ;subj
Private ;sec
"Main Board" ;conf
"Welcome to our BBS! This is your first message here!"
MSG
--------------------------------------------------------------------------
MUL <var> <val1> <val2>
--------------------------------------------------------------------------
Desc: Multiply "val1" and "val2", then store the result in variable
"var".
Parms: var variable to store result in.
val1 value 1 to multiply
val2 value 2 to multiply
Notes: The result is treated as a 10.2 float value.
Example: MUL Tot Qty Price ;Tot = Qty * Price
MUL Tot Price 3 ;Tot = Price * 3
--------------------------------------------------------------------------
NEWLINE <count>
--------------------------------------------------------------------------
Desc: Display one or more blank lines to the screen.
Parms: count optional number of new lines to display. Default is
one.
Notes: The maximum number of blank lines that may be displayed is
65,535.
Example: NEWLINE 24 ;display 24 new lines to crt (fake clr crt)
--------------------------------------------------------------------------
NULL_ENTRY <label>
--------------------------------------------------------------------------
Desc: If the last performed PROMPT entry resulted in a null entry,
processing will branch to "label".
Parms: label the label to transfer execution to
Notes: none
Example: PROMPT " Name: " Name
NULL_ENTRY AbortJob
--------------------------------------------------------------------------
OPEN <hdl> <file>
--------------------------------------------------------------------------
Desc: OPEN prepares a script for data file access. Up to 10 files
may be open at the same time, using handles from 0 to 9. If
the specified HDL is already in use by a previous call to
OPEN, it is first closed.
Parms: hdl This is the handle number, and must be a number
from 0 to 9.
file The name of the file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
This macro should be checked after a data file function to
insure proper script operation. See ORDER.DEF for examples of
these commands.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READ 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
PARSE <string>
--------------------------------------------------------------------------
Desc: Prepares "string" for call to the command GETWORD.
Parms: string The string to parse
Notes: The commands "PARSE" and "GETWORD" allow scripts to parse data
fields or environment variables into individual words. To use
these commands, "PARSE" *MUST* be called FIRST to setup
subsequent calls to "GETWORD".
Example: ......
......
PARSE @%PCBDOOR
GETWORD Option
IF Option == "*EOL*"
GOTO BadCmd
ENDIF
GETWORD FileName
IF FileName == "*EOL*"
GOTO BadCmd
ENDIF
......
......
--------------------------------------------------------------------------
PARSEPHONE <phone#> <area> <exchg> <number>
--------------------------------------------------------------------------
Desc: Parse a phone number into it's components.
Parms: phone# The phone number to parse.
area The variable to store the area code into
exchg The variable to store the exchange into
number The variable to store the number into
Notes: The phone number may be in (almost) any format. All characters
other than digits are striped from the input and then seperated
into it's components. Components that are not included in the
input are set to blanks in the matching variable.
Example: set Num2Call "1(813)123-4567"
parsephone Num2Call area exch pnum
TEXT "Area code: " area ;813
TEXT " Exchange: " excg ;123
TEXT " Number: " pnum ;4567
Example: set Num2Call " 813 123 4567"
parsephone Num2Call area exch pnum
TEXT "Area code: " area ;813
TEXT " Exchange: " excg ;123
TEXT " Number: " pnum ;4567
Example: set Num2Call "123 4567"
parsephone Num2Call area exch pnum
TEXT "Area code: " area ;" "
TEXT " Exchange: " excg ;123
TEXT " Number: " pnum ;4567
Example: set Num2Call " 4567"
parsephone Num2Call area exch pnum
TEXT "Area code: " area ;" "
TEXT " Exchange: " excg ;" "
TEXT " Number: " pnum ;4567
--------------------------------------------------------------------------
PROMPT <prompt> <var>
--------------------------------------------------------------------------
Desc: Get keyboard input from caller.
Parms: prompt The prompt displayed to the caller.
var The variable name used to store the caller's entry.
Notes: none.
Example: PROMPT " Name: " Name
--------------------------------------------------------------------------
PRINT <lp> <text>
--------------------------------------------------------------------------
Desc: Print data to the specified printer.
Parms: lp The printer # to print to (1=LPT1,2=LPT2,3=LPT3)
text The data to print. If the text is "_FF", a form feed
is sent to the printer.
Notes: none.
Example: PRINT 1 "-------------------------------------------------"
PRINT 1 "New Caller"
PRINT 1 "-------------------------------------------------"
PRINT 1 " Name: " Name
PRINT 1 " City: " City
PRINT 1 "-------------------------------------------------"
--------------------------------------------------------------------------
RANDOM_STR <count> <var>
--------------------------------------------------------------------------
Desc: Generate a string of "count" characters, and store the
result in variable "string"
Parms: count The number of random characters to generate. If
this value is 0, the generated string will be
equal to the size of the variable "string".
string Variable to store the result in.
Notes: The generated string will contain alpha numeric characters
only.
Example: RANDOM_STR 0 random_str
--------------------------------------------------------------------------
READ <hdl> <format>
--------------------------------------------------------------------------
Desc: READ reads a data record from the file specified by 'hdl',
into the variables contained in 'format'. The key that is used
to read the data file is built from the key fields in the
specified format.
Parms: hdl The file handle, and must be a number from 0 to 9.
format The name of the FORMAT for this file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
If the end of file is reached, the macro "@file_stat@" is set
to the value "*EOF*" (End Of File). This macro should be
checked after a data file function to insure proper script
operation.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READ 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
READF <hdl> <format>
--------------------------------------------------------------------------
Desc: READF reads the first data record from the file specified by
'hdl', into the variables contained in 'format'.
Parms: hdl The file handle, and must be a number from 0 to 9.
format The name of the FORMAT for this file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
If the end of file is reached, the macro "@file_stat@" is set
to the value "*EOF*" (End Of File). This macro should be
checked after a data file function to insure proper script
operation.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READF 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
READL <hdl> <format>
--------------------------------------------------------------------------
Desc: READL reads the last data record from the file specified by
'hdl', into the variables contained in 'format'.
Parms: hdl The file handle, and must be a number from 0 to 9.
format The name of the FORMAT for this file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
If the end of file is reached, the macro "@file_stat@" is set
to the value "*EOF*" (End Of File). This macro should be
checked after a data file function to insure proper script
operation.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READL 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
READN <hdl> <format>
--------------------------------------------------------------------------
Desc: READN reads the next data record from the file specified by
'hdl', into the variables contained in 'format'.
Parms: hdl The file handle, and must be a number from 0 to 9.
format The name of the FORMAT for this file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
If the end of file is reached, the macro "@file_stat@" is set
to the value "*EOF*" (End Of File). This macro should be
checked after a data file function to insure proper script
operation.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READN 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
READP <hdl> <format>
--------------------------------------------------------------------------
Desc: READP reads the previous data record from the file specified
by 'hdl', into the variables contained in 'format'.
Parms: hdl The file handle, and must be a number from 0 to 9.
format The name of the FORMAT for this file.
Notes: The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
If the end of file is reached, the macro "@file_stat@" is set
to the value "*EOF*" (End Of File). This macro should be
checked after a data file function to insure proper script
operation.
Also see "FORMAT".
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READP 0 DatFmt
CLOSE 0
--------------------------------------------------------------------------
REPEAT <row> <col> <char> <cnt>
--------------------------------------------------------------------------
Desc: Display a specified character a specified number of times, at
a specified row and col.
Parms: row row to start display of "prompt".
col column to start display of "prompt".
char The character to display
cnt The number of characters to display
Notes: This command may only be used if the caller in is graphics
mode.
Example: REPEAT 5 15 "─" 30
--------------------------------------------------------------------------
RETURN
--------------------------------------------------------------------------
Desc: Return from a GOSUB
Parms: none
Notes: none
Example: ...
...
TEXT "prior to GOSUB"
GOSUB There
TEXT "back from GOSUB"
STOP
:There
TEXT "in GOSUB"
RETURN
--------------------------------------------------------------------------
RUN <script> <label>
--------------------------------------------------------------------------
Desc: Execute another script. The script that is run does not return
control to the caller on exit.
Parms: script The name of the script to run.
label Optional label to start execution at.
Notes: none
Example: RUN "menu.def" StartUp
--------------------------------------------------------------------------
SEC_LOOKUP <file>
--------------------------------------------------------------------------
Desc: Searches the specified file for the user name. If it is found,
the security level specified in the look-up file is used. This
could be used in a new callers script, with the names of
friends (or customers, or etc..) in the look-up file. Note
that a modified security level is not written back to the user
file until the UPDATE_USER_RECORD command is executed.
The format of the look-up file is as follows:
name, level
Parms: file The file name to search.
Notes: A modified security level is not written back to the user file
until the UPDATE_USER_RECORD command is executed.
Example: look-up file contents:
ABDUL RASHEEDI, 50
RICHARD MORTON, 50
SHELDON GIBBS, 50
CRAIG FILLION, 50
MIKE SAUNDERS, 50
These people would be given a security level of 50.
--------------------------------------------------------------------------
SEC_TABLE
<val1> <val2>
[<val1> <val2>]
...
SEC_TABLE
--------------------------------------------------------------------------
Desc: Change one specific level to another level. Any number of
levels may be tested. When a match is made, the table is
exited. Note that a modified security level is not written
back to the user file until the UPDATE_USER_RECORD command is
executed.
Parms: val1 Test security level
val2 New security level, if current = val1
Notes: A modified security level is not written back to the user file
until the UPDATE_USER_RECORD command is executed.
Example: SEC_TABLE ;Security Table Start
9 10 ; users at sec level 9 goto 10
10 20 ; users at sec level 10 goto 20
20 30 ; users at sec level 20 goto 30
SEC_TABLE ;Security Table End
--------------------------------------------------------------------------
SENDMODEM <lmt> <cmnd>
--------------------------------------------------------------------------
Desc: Send a string to the modem.
Parms: lmt Time limit in seconds
cmnd Modem command.
Notes: none
Example: sendmodem 5 "ATZ"
--------------------------------------------------------------------------
SET <var> <val>
--------------------------------------------------------------------------
Desc: Initialize (or modify) the current value of a variable. The
"val" may contain a variable combination of literal data,
field names, system variables and environment variables. The
combination of all data (the final result) may not exceed 255
char's.
Parms: var The variable to modify.
val The value to store into "var".
Notes: none
Example: SET Row 1
--------------------------------------------------------------------------
SETCINFO <conf> <flag> <state>
--------------------------------------------------------------------------
Desc: Sets the status of a specified conference for the caller.
Parms: conf the conference number (0=main).
flag REGISTERED,EXPIRED,SCANMAIL,SYSOP,HASMAIL,JOINED,
SCANNED.
state TRUE or FALSE.
Notes: none
Example: SETCINFO 0 REGISTERED TRUE
--------------------------------------------------------------------------
SETMASK <var> <mask>
--------------------------------------------------------------------------
Desc: Set the entry mask for a variable.
Parms: var The variable to set the entry mask for.
mask The new entry mask.
Notes: none
Example: setmask Option "<123>" ;set new entry mask
--------------------------------------------------------------------------
SHELL <prg> <parms>
--------------------------------------------------------------------------
Desc: Shells to DOS and performs the command "prg". The command may
be any combination of literal data, system variables and
currently defined script variables. If the program requires
paramters, use 'parms' to specify them.
Parms: prg The program (or BAT file or DOS command)
parms Optional program parms
Notes: The macro "@shell_stat@" is loaded with the ERRORLEVEL of the
SHELL command on return.
Example: SET DszCmd "j:\pcb\DSZ.com port " @port@
....
....
SET DszCmd DszCmd " ha bo z rz -mrr " Directory
SHELL DszCmd
--------------------------------------------------------------------------
SRCHTXTFILE <srchtxt> <file>
--------------------------------------------------------------------------
Desc: Search a text file for a specified string.
Parms: srchtxt The text to search for.
file The file to search.
Notes: If the search text is found, "@file_stat@" will be set to
"*OK*", otherwise it is set to "*KNF*".
Example: SRCHTXTFILE Name mytcan.tst
if @file_stat@ == "*OK*"
goodbye
endif
--------------------------------------------------------------------------
SUB <var> <val1> <val2>
--------------------------------------------------------------------------
Desc: Subtract "val2" from "val1", then store the result in variable
"var".
Parms: var variable to store result in.
val1 Value to be subtracted from.
val2 Value to subtract.
Notes: The result is treated as a 10.2 float value.
Example: SUB Temp Price Tax ;Temp = Price - Tax
SUB Tot Price 3 ;Tot = Price - 3
--------------------------------------------------------------------------
SWITCH <field>
CASE [<val>|<field>]
<stmnts>
BREAK
[CASE <val>|<field>
<stmnts>
BREAK]
[DCASE
<stmnts>
BREAK]
SWITCH END
--------------------------------------------------------------------------
Desc: The SWITCH/CASE/BREAK clause allows processing based on a
selected number of values, and is most often used in menu
processing.
Parms: Variable
Notes: Variables may be used in CASE statements. CASE tags not
terminated by a BREAK will "fall" through to the next
statement line in the script.
The DCASE tag is selected if all previous CASE statements
fail.
Example: FIELDS
Sel _ C
FIELDS
;
:SelMenu
TEXT "------------------------------------------------"
TEXT " Order Menu"
TEXT "------------------------------------------------"
TEXT " 1. XT 9. Exit"
TEXT " 2. 286"
TEXT " 3. 386"
TEXT " 4. 486"
TEXT ""
PROMPT "Selection: " Sel
SWITCH Sel
CASE "1"
TEXT "You entered 1"
BREAK
CASE "2"
TEXT "You entered 2"
BREAK
CASE "3"
TEXT "You entered 3"
BREAK
CASE "4"
TEXT "You entered 4"
BREAK
CASE "9"
GOTO EndJob
DCASE
TEXT " Invalid Selection. Please try again."
BREAK
SWITCH END
GOTO SelMenu
:EndJob
TEXT "You entered 9"
EXIT
--------------------------------------------------------------------------
TRIM <var> [<var>...<var>]
--------------------------------------------------------------------------
Desc: Trim leading and trailing spaces from var(s).
Parms: var The variable to trim.
Notes: none
Example: TRIM name addr city state zip ;strip these var's
--------------------------------------------------------------------------
TRIML <var> [<var>...<var>]
--------------------------------------------------------------------------
Desc: Trim leading spaces from var(s).
Parms: var The variable to trim.
Notes: none
Example: TRIML name addr city state zip ;left strip these var's
--------------------------------------------------------------------------
TRIMR <var> [<var>...<var>]
--------------------------------------------------------------------------
Desc: Trim trailing spaces from var(s).
Parms: var The variable to trim.
Notes: none
Example: TRIMR name addr city state zip ;right strip these var's
--------------------------------------------------------------------------
UCASE <var>
--------------------------------------------------------------------------
Desc: Converts all characters in "var" to upper case.
Parms: var The variable to modify.
Notes: none
Example: UCASE Occupation
--------------------------------------------------------------------------
UPDATE_USER_RECORD
--------------------------------------------------------------------------
Desc: Update the user record on exit from the door. If this command
is not executed, the user record is *not* updated.
Parms: none
Notes: none
Example: INCREASE 1 10
UPDATE_USER_RECORD
--------------------------------------------------------------------------
VALIDCREDITCARD <card#> <var>
--------------------------------------------------------------------------
Desc: Validates a credit card number.
Parms: card# The variable (or literal string) that contains the
credit card number to validate.
var The variable name used to store the result of the
validation. If the card is a valid number, 'var'
will be set to the first char of the card #. If the
card number if not valid, 'var' will be set to a
null string ("").
Notes: The type of card being processed can be determined by testing
the first digit of the credit card number (each card vendor
uses a unique first digit).
Example: PROMPT "Enter Card Number: " CardNum
VALIDCREDITCARD CardNum CardResult
SWITCH CardResult
CASE "3"
SET CardType "AMEX"
BREAK
CASE "4"
SET CardType "VISA"
BREAK
CASE "5"
SET CardType "MC"
BREAK
CASE "6"
SET CardType "DISC"
BREAK
DCASE
TEXT " Invalid Selection. Please try again."
GOTO BadNumber
SWITCH END
--------------------------------------------------------------------------
WRITE <hdl> <format>
--------------------------------------------------------------------------
Desc: Write a data record to the file specified by 'hdl', using the
variables contained in 'format'. The record is written using
a key as defined in 'format'.
Parms: hdl This is the handle number, and must be a number
from 0 to 9.
format The name of the FORMAT for this file.
Notes: If the key currently exist in the data file, it will be
updated with the new record (from memory). If it does not
exist, it will be added to the data file.
The macro "@file_stat@" contains the result of the last data
file operation performed by PCBSuperScript. All data file
functions load this macro with "*OK*" if no error occurred.
This macro should be checked after a data file function to
insure proper script operation. See ORDER.DEF for examples of
these commands.
Example: OPEN 0 J:\PCB\SS\DATA.DAT
READ 0 DatFmt
SET UFlag 1
WRITE 0 DatFmt
CLOSE 0
Supported PCBoard Macros and Environment Variables
-----------------------------------------------------------------------------
The following PCBoard Macros are available:
Caller Information
------------------
@bps@ Connect Speed
@city@ City
@comment1@ Comment line 1
@comment2@ Comment line 2
@confnum@ Current Conference Number
@dataphone@ Business/Data Phone
@daybytes@ Daily D/L Bytes
@dlbytes@ Total D/L Bytes
@dlfiles@ Total D/L Files
@expertmode@ Expert mode
@expdate@ Expiration Date
@file_stat@ Status of last PCBSuperScript file command
@first@ First Name (first letter capitalized)
@firstu@ First Name (all caps)
@graphics@ 0 = not in graphics mode, 1 = in graphics mode
@homephone@ Home/Voice Phone
@lastdateon@ Last Date On
@lasttimeon@ Last Time On
@minleft@ Minutes Left
@msgleft@ Number of Messages Written
@msgread@ Number of Messages Read
@numtimeson@ Number of Times On
@pagelen@ Page length setting
@password@ User password
@port@ Port id
@proltr@ Default Protocol Letter
@security@ Security Level
@shell_stat@ Status of last PCBSuperScript shell command
@timelimit@ Time Limit
@timeused@ Time Used
@totaltime@ Total Time Used so far Today
@upbytes@ Total U/L Bytes
@upfiles@ Total U/L Files
@user@ Full Name (all caps)
System Information
------------------
@boardname@ Name of the BBS you are on
@event@ Event Time
@node@ Node Number
@sysdate@ Current Date
@systime@ Current Time
@ss_version@ PCBSuperScript version number
Display Controls
----------------
@automore@ Treats "more?" prompts in a file like @pause@
@beep@ Sends a CTRL-G (ascii BELL character) to the
caller but is not heard on the local machine
unless the Caller Alarm is turned on
@cls@ Clear the entire screen
@clreol@ Clear from the cursor to the end of the line
@more@ Cause a "more?" prompt to be displayed
@pause@ Displays a "more?" prompt with a 10 second auto
return if the caller doesn't answer it first
@poff@ Turns Prompts OFF (disables "more?" prompt)
@pon@ Turns Prompts ON (enables "more?" prompt)
@qoff@ Disables CTRL-X/CTRL-K checking (display abort)
@qon@ Enables CTRL-X/CTRL-K checking (display abort)
@wait@ Display a "press enter to continue" prompt
@X## Normal PCBoard color control code.
Environment variables are variables that are currently defined in your
DOS environment. Environmental variables are accessed in the following
manner:
@%name Access environment variable "name".
Whenever a PCBoard Macro or Environment variable is referenced in a
script, the current value of the variable is substituted for the variable
name.